﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shop.Model.Entity.Use
{
    /// <summary>
    /// 用户钱包
    /// </summary>
    [SugarTable("use_user_wallet_log")]
    public class UserWalletLog : BaseEntity
    {
        /// <summary>
        /// 
        /// </summary>
        public UserWalletLog()
        {
        }

        /// <summary>
        /// 用户Id
        /// </summary>
        public long UserId { get; set; }  
        
        /// <summary>
        /// 关联订单Id 
        /// </summary>
        public long? SourceOrder { get; set; }

        /// <summary>
        /// 钱包操作
        /// </summary>
        public int Action { get; set; }
        
        /// <summary>
        /// 状态
        /// -1 处理失败
        /// 0 处理中
        /// 1 处理成功
        /// </summary>
        public int State { get; set; }

        /// <summary>
        /// 操作说明
        /// </summary>
        public string Title { get; set; }
        
        /// <summary>
        /// 手续费
        /// </summary>
        public decimal Procedure { get; set; }

        /// <summary>
        /// 变动金额
        /// </summary>
        public decimal Amount { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(IsOnlyIgnoreInsert = true)]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 成功/失败时间
        /// </summary>
        public DateTime? FinishTime { get; set; }
    }
}
